package StudyCode.summary.zipfile;

import java.io.ByteArrayInputStream;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class ReadByteArrayUsingByteArrayInputStream {
	public static void main(String[] args) {

		String str = "www.tah1986.com!";
		byte[] bytes = str.getBytes();

		ByteArrayInputStream bai = new ByteArrayInputStream(bytes);

		int ch;

		while ((ch = bai.read()) != -1) {
			System.out.print((char) ch);
		}

	}
}
